[mirrors]
https://tls.mbed.org/download/mbedtls-2.2.0-apache.tgz

[vars]
filesize=1860353
sha512=29bcd8b8a19f07a8d90bd6b5bea4564dc57ad6ad29967a888f374901094d2fb88a3449c59b89240c41a96b438fff8217b5cef52de8cd74bdf62099dbaa1392c2
tardir=mbedtls-2.2.0

[deps]

[build]
# NOTE: the mirror requires tls, download with curl:
# 	USE_CURL=1 butch install mbedtls
# hiawatha requires these options (see USE_SYSTEM_MBEDTLS in its
# CMakeLists.txt)
echo "#define MBEDTLS_THREADING_C" >> include/mbedtls/config.h
echo "#define MBEDTLS_THREADING_PTHREAD" >> include/mbedtls/config.h

# build the library and all binaries statically (includes
# mbedtls_selftest)
sed -i 's@^\.SILENT:.*$@@' library/Makefile programs/Makefile Makefile
make -j$MAKE_THREADS no_test CFLAGS="$optcflags" LDFLAGS="$optldflags"

make DESTDIR="$butch_install_dir" install

